<template>
  <div>zi<button @click="push()">逆向传值</button></div>
</template>

<script>
import Eventbus from "@/eventbus.js";
export default {
  data() {
    return {
      zi: "我是孩子的数据",
    };
  },
  methods: {
    push() {
      this.$emit("zi", this.zi);
    },
  },
  mounted() {
    Eventbus.$on("zi", (val) => {
      console.log(val);
    });
  },
};
</script>

<style scoped>
div {
  font-size: 0.16rem;
}
</style>